package com.cnebula.openapi.auth.authtoken;

import io.vertx.core.json.JsonObject;

public class MainOptions {

	public static final String CLI_REDIS_HOST = "redis.host";
	public static final String CLI_REDIS_PORT = "redis.port";

	public static final String DEFAULT_REDIS_HOST = "127.0.0.1";
	public static final int DEFAULT_REDIS_PORT = 6379;

	private String redisHost;
	private int redisPort;
	
	public MainOptions(JsonObject options) {
		this.redisHost = options.getString(CLI_REDIS_HOST, DEFAULT_REDIS_HOST);
		this.redisPort = options.getInteger(CLI_REDIS_PORT, DEFAULT_REDIS_PORT);
	}

	public String getRedisHost() {
		return redisHost;
	}

	public int getRedisPort() {
		return redisPort;
	}

}
